home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / lfsrecov / fileop.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-02  |  2.5 KB  |  81 lines

  1. /*
  2.  * fileop.h --
  3.  *
  4.  *    Declarations of the interface the the file and dir mantipulation
  5.  *    routines in files.c
  6.  *
  7.  * Copyright 1991 Regents of the University of California
  8.  * Permission to use, copy, modify, and distribute this
  9.  * software and its documentation for any purpose and without
  10.  * fee is hereby granted, provided that this copyright
  11.  * notice appears in all copies.  The University of California
  12.  * makes no representations about the suitability of this
  13.  * software for any purpose.  It is provided "as is" without
  14.  * express or implied warranty.
  15.  *
  16.  * $Header: /sprite/lib/forms/RCS/proto.h,v 1.7 91/02/09 13:24:52 ouster Exp $ SPRITE (Berkeley)
  17.  */
  18.  
  19. #ifndef _FILEOP
  20. #define _FILEOP
  21.  
  22. /* constants */
  23.  
  24. /* data structures */
  25.  
  26. /* procedures */
  27.  
  28. extern ReturnStatus AddEntryToDirectory _ARGS_((int dirFileNumber, 
  29.         int dirOffset, Fslcl_DirEntry *dirEntryPtr, 
  30.         Boolean isDirectory, Boolean mayExist));
  31. extern ReturnStatus RemovedEntryFromDirectory _ARGS_((
  32.         int dirFileNumber, int dirOffset, Fslcl_DirEntry *dirEntryPtr,
  33.         Boolean isDirectory, Boolean mayBeGone));
  34. extern ReturnStatus GrowDirectory _ARGS_((LfsFile *dirFilePtr, int dirOffset));
  35.  
  36. extern ReturnStatus CreateLostDirectory _ARGS_((int fileNumber));
  37.  
  38. enum DescOpType { OP_ABS, /* Set it to an absolute value. */
  39.           OP_REL, /* Set it relative to the new value. */
  40.         };
  41.  
  42. extern ReturnStatus UpdateDescLinkCount _ARGS_((enum DescOpType opType,
  43.             int fileNumber, int linkCount));
  44.  
  45. extern  void RecordIndirectBlockUsage _ARGS_((LfsFile  *oldFilePtr, 
  46.     LfsFile  *newFilePtr, 
  47.     int virtualBlockNum,  int startBlockNum, int step, 
  48.     int lastByteBlock[2], int lastByteBlockSize[2]));
  49.  
  50. extern void RecordBlockUsageChange _ARGS_((int fileNumber, LfsFile *oldFilePtr,
  51.                        LfsFile *newFilePtr));
  52.  
  53. extern void RecoveryFile _ARGS_((int fileNumber, int address, 
  54.                 LfsFileDescriptor *descPtr));
  55.  
  56. extern void RecordLostCreate _ARGS_((int dirFileNumber, 
  57.             Fslcl_DirEntry *dirEntryPtr));
  58.  
  59. extern char *FileTypeToString _ARGS_((int fileType));
  60.  
  61. extern Boolean DescExists _ARGS_((int fileNumber));
  62.  
  63. extern enum LogStatus DirBlockStatus _ARGS_((int dirFileNumber, 
  64.                 int dirOffset, int startAddr, int addr));
  65.  
  66. extern enum LogStatus DescStatus _ARGS_(( int dirFileNumber,  
  67.                 int startAddr, int addr));
  68.  
  69. extern void RecovFileLayoutSummary _ARGS_((Lfs *lfsPtr, enum Pass pass, 
  70.     LfsSeg *segPtr, int startAddr, int offset, 
  71.     LfsSegSummaryHdr *segSummaryHdrPtr));
  72.  
  73. extern ReturnStatus MakeEmptyDirectory _ARGS_((int fileNumber, 
  74.             int parentFileNumber));
  75.  
  76. extern void UpdateLost_Found _ARGS_((Lfs *lfsPtr));
  77.  
  78. #endif /* _FILEOP */
  79.  
  80.  
  81.